package com.spddr.pmos.jpa;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.spddr.pmos.domain.GeoLocation;

import cn.seqdata.jpa.JpaNoGeneratedObject;

@Entity
@Table(name = "org_info")
@Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name = "type", discriminatorType = DiscriminatorType.INTEGER)
public class Organization extends JpaNoGeneratedObject implements GeoLocation {
	private static final long serialVersionUID = 1L;

	private String regName;
	private String identityId;
	private String ediCode;
	private String represent;
	private String phone;
	private String fax;
	private String residence;
	private Double lng;
	private Double lat;
	private String location;

	public Organization() {
		super();
	}

	public Organization(Long id) {
		super(id);
	}

	public Organization(Long id, String name) {
		super(id, name);
	}

	@Column(name = "reg_name")
	public String getRegName() {
		return this.regName;
	}

	public void setRegName(String regName) {
		this.regName = regName;
	}

	@Column(name = "identity_id", length = 18)
	public String getIdentityId() {
		return this.identityId;
	}

	public void setIdentityId(String identityId) {
		this.identityId = identityId;
	}

	@Column(name = "edi_code", length = 18)
	public String getEdiCode() {
		return this.ediCode;
	}

	public void setEdiCode(String ediCode) {
		this.ediCode = ediCode;
	}

	@Column(name = "represent")
	public String getRepresent() {
		return this.represent;
	}

	public void setRepresent(String represent) {
		this.represent = represent;
	}

	@Column(name = "phone", length = 20)
	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "fax", length = 20)
	public String getFax() {
		return this.fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	@Column(name = "residence")
	public String getResidence() {
		return this.residence;
	}

	public void setResidence(String residence) {
		this.residence = residence;
	}

	@Column(name = "lng")
	@Override
	public Double getLng() {
		return this.lng;
	}

	public void setLng(Double lng) {
		this.lng = lng;
	}

	@Column(name = "lat")
	@Override
	public Double getLat() {
		return this.lat;
	}

	public void setLat(Double lat) {
		this.lat = lat;
	}

	@Column(name = "location")
	@Override
	public String getLocation() {
		return this.location;
	}

	public void setLocation(String location) {
		this.location = location;
	}
}